package hotmail;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SeleniumHotmail {
	@Test
	public void useHotmailTest(){
		WebDriver driver = new FirefoxDriver();
		driver.get("http://www.hotmail.com");
		WebElement userName = driver.findElement(By.id("i0116"));
		userName.sendKeys("smsbeyondsoft@hotmail.com");
		WebElement password = driver.findElement(By.id("i0118"));
		password.sendKeys("green123");
		WebElement login = driver.findElement(By.id("idSIButton9"));
		login.click();
		try {
			Thread.sleep(3000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
//		WebElement inbox = driver.findElement(By.xpath("//*[@id='folderList']/ul/li/div/div[1]/a/span"));
		WebElement inbox = driver.findElement(By.xpath("//*[@id='h_messages']/div/div[2]/div/a[1]"));
		inbox.click();
		driver.quit();
	}
}
